package com.example.bbs.util;

import java.net.URI;

/**
 * @author jiajiazi
 * @version 1.0
 * @date 2021/5/4 16:56
 */
public class ConstUtil {
    public final static String FILE_UPLOAD_DISEASE = "D:/JZ课程大三下/综合实习/BBS/src/main/resources/static/img/uploadimg_disease/";
    public final static String FILE_UPLOAD_AVATOR = "D:/JZ课程大三下/综合实习/BBS/src/main/resources/static/img/uploadimg_avator/";
    public final static String IMG_DISEASE_TPATH = "/img/uploadimg_disease/";
    public final static String IMG_AVATOR_TPATH = "/img/uploadimg_avator/";
    public final static String DEFAULT_USER_IMG = "/img/login/female.png";
    public final static String DEFAULT_ARTICLE_IMG = "/img/login/male.png";

    public static URI getHost(URI uri) {
        URI effectiveURI = null;
        try {
            effectiveURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), null, null, null);
        } catch (Throwable var4) {
            effectiveURI = null;
        }
        return effectiveURI;
    }
}
